﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Epam.PhotoGallery.Interfaces.DataTransferObjects
{
    /// <summary>
    /// This class represent base information about topic
    /// </summary>
    public class BaseTopicInfo
    {
        #region Fields

        private string _id;

        #endregion

        /// <summary>
        /// Gets or sets the topic's ID 
        /// </summary>
        /// <value>
        /// The topic's ID
        /// </value>
        public string ID
        {
            get
            {
                if (_id == null)
                {
                    _id = Guid.NewGuid().ToString();
                }

                return _id;
            }

            set
            {
                if (value != null)
                {
                    _id = value;
                }
            }
        }

        /// <summary>
        /// Gets or sets the topic's title 
        /// </summary>
        /// <value>
        /// The topic's title
        /// </value>
        public string Title
        { get; set; }

        /// <summary>
        /// Gets or sets the topic's author 
        /// </summary>
        /// <value>
        /// The topic's author
        /// </value>
        public string Author
        { get; set; }

        /// <summary>
        /// Gets or sets the topic's creation date 
        /// </summary>
        /// <value>
        /// The topic's creation date
        /// </value>
        public DateTime CreationDate
        { get; set; }
    }
}
